<template>
	<div class="header" ref="header">
		<div class="imgs">
			<u-avatar :src="imges"></u-avatar>
		</div>
		<div class="xinxi">
			<div class="name">
				{{nickName || "游客"}}
			</div>
			<div class="yewuyuan" style="text-align: center;">
				{{who || "无名氏"}}
			</div>
		</div>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				nickName:"",
				imges:"",
				who:""
				
			}
		},
		beforeCreate() {
			var that=this
			wx.getStorage({
				key:"nickName",
				success(res) {
					that.nickName=res.data
					console.log(that.nickName);
				}
			})
			wx.getStorage({
				key:"agent_id",
				success(res) {
					// that.agent_id=res.data
					that.who="业务员"
				}
			})
			wx.getStorage({
				key:"avatarUrl",
				success(res) {
					that.imges=res.data
					console.log(that.imges);
				}
			})
		},
	}
</script>

<style scoped lang="scss">
	.header {
		padding-left: 47upx;
		// margin-top: 10upx;
		background-color: #ff6666;
		height: 184upx;
		display: flex;
		width: 100%;
		flex-direction: row;
		align-items: center;

		image {
			border-radius: 50%;
			width: 122rpx;
			height: 122rpx;
		}

		.yewuyuan {
			width: 74upx;
			height: 28upx;
			background-color: #ff9900;
			color: #FFFFFF;
			font-size: 20upx;
		}

		.xinxi {
			margin-left: 25upx;

			.name {
				margin-bottom: 22upx;
				color: #FFFFFF;
				font-size: 30upx;
			}

			align-self: center;
		}
	}
</style>
